import request from "@/utils/request";
import type { AxiosPromise } from "axios";
import type { UserInfo } from "./types";

/**
 * 登录成功后获取用户信息（昵称、头像、权限集合和角色集合）
 * @returns {AxiosPromise<UserInfo>}
 */
export function getUserInfoApi():AxiosPromise<UserInfo>{
    return request({
        url: "/youlai-auth/oauth2/userinfo",
        method: "get",
    })
}